/*
 * Motor_Control_Fcns.h
 *
 *  Created on: Mar 25, 2024
 *      Author: Yiwen Zhu
 */

#ifndef SELF_DEFINE_MOTOR_CONTROL_FCNS_H_
#define SELF_DEFINE_MOTOR_CONTROL_FCNS_H_
#include <clarke.h>
#include "my_def.h"
#include "tim.h"
#include "main.h"
#include "svgen.h"
#include "park.h"
#include "pid_reg3.h"
#include "ipark.h"
#include "kalman.h"
#include "cordic_calc.h"
#include "i2c_as5600_dma.h"
#include "math.h"
#include "cordic_calc.h"
#include "Motor_Control_Init.h"
#include "hf_inj.h"

void svm_tim_update(float Ta,float Tb,float Tc);
void get_current_sample_real_value(void);
float get_electrical_angle_real_value(void);


void CTL_init_ang(void);
void CTL_openloop_foc_task(void);
void CTL_current_loop_foc_task(void);
void CTL_current_loop_MPCC_task(void);
void CTL_current_loop_MPDTC_task(void);

#endif /* SELF_DEFINE_MOTOR_CONTROL_FCNS_H_ */
